<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>Title</title>
		<style>
			.box {
				height: 500px;
				background-color: #ccc;
				overflow: hidden;
			}

			.mybox-leave-active,
			.mybox-enter-active {
				transition: all 1s ease;
			}

			.mybox-leave-active,
			.mybox-enter {
				height: 0px !important;
			}

			.mybox-leave,
			.mybox-enter-active {
				height: 500px;
			}
		</style>
	</head>
	<body>
		<div id="box">
			<p>{{aaa || bbb}}</p>
			<button @click="togglebox">按钮</button>
			<transition name="mybox">
				<div class="box" v-show="boxshow"></div>
			</transition>
		</div>
		
		<div id="box_111">
			<button @click="togglebox">按钮</button>
			<transition name="mybox">
				<div class="box" v-show="boxshow"></div>
			</transition>
		</div>
	</body>
	<script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
	<script>
		new Vue({
			el: '#box',
			data: {
				boxshow: false,
				aaa: false,
				bbb: 11111
			},
			methods: {

				togglebox: function() {
					this.boxshow = !this.boxshow;
				}
			}
		});
		new Vue({
			el: '#box_111',
			data: {
				boxshow: false
			},
			methods: {

				togglebox: function() {
					this.boxshow = !this.boxshow;
				}
			}
		});
	</script>
</html>
